<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>cookie demo</title>
</head>

<body>
    <!-- <script src="./cookies.js"></script> -->

    <!-- <script>
        /* cookie的基本操作 */

        // 设置cookie
        document.cookie = "a=100;";
        document.cookie = "b=200;";
        document.cookie = "c=300;";
        document.cookie = "d=400;path=/"

        // 查询cookie
        console.log(document.cookie);

        // 创建一个已经过期的伦敦时间
        // 设置给cookie c 令其过期 逻辑删除
        // document.cookie = "c=600;expires=Tue May 18 2021 14:34:00 GMT";
        document.cookie = `c=123;expires=${new Date( Date.now()-8*3600*1000 + 10*1000 ).toString()}`
        console.log(document.cookie);

        // 修改即重新设置
        document.cookie = "b=201;"
        console.log(document.cookie);

    </script> -->
</body>

</html>